<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // function Pig(uname, age) {
    //   this.uname = uname
    //   this.age = age
    // }
    // const res = new Pig('胡俊杰', 18)
    // const res1 = new Pig('成侃航', 58)
    // const res2 = new Pig('志刚', 38)
    // console.log(res);
    // console.log(res1);
    // console.log(res2);
    function Goods(uname, price) {
      this.uname = uname
      this.price = price
    }
    //实例成员
    const phone = new Goods('iphone', 10000)
    const phone1 = new Goods('小米', 3999)
    const phone2 = new Goods('华为', 5000)
    const phone3 = new Goods('vivo', 4000)
    const phone4 = new Goods('oppo', 4100)
    const phone5 = new Goods('魅族', 4100)
    //静态成员
    Goods.product='广东'
    console.log(Goods.product);
  </script>
</body>

</html>